<div class="content-section introduction">
    <div class="feature-intro">
        <h1>ProgressSpinner</h1>
        <p>ProgressSpinner is a process status indicator.</p>
    </div>
</div>

<div class="content-section implementation">
    <div class="card">
        <h5>Basic</h5>
        <p-progressSpinner></p-progressSpinner>
    
        <h5>Custom</h5>
        <p-progressSpinner [style]="{width: '50px', height: '50px'}" styleClass="custom-spinner" strokeWidth="8" fill="#EEEEEE" animationDuration=".5s"></p-progressSpinner>
    </div>
</div>

<div class="content-section documentation">
    <p-tabView>
        <p-tabPanel header="Documentation">
            <h5>Import</h5>
<app-code lang="typescript" ngNonBindable ngPreserveWhitespaces>
import &#123;ProgressSpinnerModule&#125; from 'primeng/progressspinner';
</app-code>

            <h5>Getting Started</h5>
            <p>ProgressSpinner is defined using p-progressSpinner element.</p>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;p-progressSpinner&gt;&lt;/p-progressSpinner&gt;
</app-code>
            <h5>Colors</h5>
            <p>Colors of the spinner can be changed by overriding the keyframes animation</p>

<app-code lang="css" ngNonBindable ngPreserveWhitespaces>
@keyframes p-progress-spinner-color &#123;
    100%,
    0% &#123;
        stroke: #d62d20;
    &#125;
    40% &#123;
        stroke: #0057e7;
    &#125;
    66% &#123;
        stroke: #008744;
    &#125;
    80%,
    90% &#123;
        stroke: #ffa700;
    &#125;
&#125;
</app-code>
            


            <h5>Properties</h5>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Type</th>
                            <th>Default</th>
                            <th>Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>strokeWidth</td>
                            <td>string</td>
                            <td>2</td>
                            <td>Width of the circle stroke.</td>
                        </tr>
                        <tr>
                            <td>fill</td>
                            <td>string</td>
                            <td>null</td>
                            <td>Color for the background of the circle.</td>
                        </tr>
                        <tr>
                            <td>animationDuration</td>
                            <td>string</td>
                            <td>2s</td>
                            <td>Duration of the rotate animation.</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h5>Styling</h5>
            <p>Following is the list of structural style classes, for theming classes visit <a href="#" [routerLink]="['/theming']">theming page</a>.</p>
            <div class="doc-tablewrapper">
                <table class="doc-table">
                    <thead>
                        <tr>
                            <th>Name</th>
                            <th>Element</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>p-progress-spinner</td>
                            <td>Container element.</td>
                        </tr>
                        <tr>
                            <td>p-progress-circle</td>
                            <td>SVG element.</td>
                        </tr>
                        <tr>
                            <td>p-progress-path</td>
                            <td>Circle element.</td>
                        </tr>
                    </tbody>
                </table>
            </div>

            <h5>Dependencies</h5>
            <p>None.</p>
        </p-tabPanel>

        <p-tabPanel header="Source">
            <a href="https://github.com/primefaces/primeng/tree/master/src/app/showcase/components/progressspinner" class="btn-viewsource" target="_blank">
                <span>View on GitHub</span>
            </a>
            <a href="https://stackblitz.com/edit/primeng-progressspinner-demo" class="btn-viewsource" style="margin-left: .5em;" target="_blank">
                <span>Edit in StackBlitz</span>
            </a>
<app-code lang="markup" ngNonBindable ngPreserveWhitespaces>
&lt;h5&gt;Basic&lt;/h5&gt;
&lt;p-progressSpinner&gt;&lt;/p-progressSpinner&gt;

&lt;h5&gt;Custom&lt;/h5&gt;
&lt;p-progressSpinner [style]="&#123;width: '50px', height: '50px'&#125;" styleClass="custom-spinner" strokeWidth="8" fill="#EEEEEE" animationDuration=".5s"&gt;&lt;/p-progressSpinner&gt;
</app-code>
<app-code lang="css" ngNonBindable ngPreserveWhitespaces>
:host ::ng-deep .custom-spinner .p-progress-spinner-circle &#123;
    animation: custom-progress-spinner-dash 1.5s ease-in-out infinite, custom-progress-spinner-color 6s ease-in-out infinite;
&#125;

@keyframes custom-progress-spinner-color &#123;
    100%,
    0% &#123;
        stroke: #16697A;
    &#125;
    40% &#123;
        stroke: #489FB5;
    &#125;
    66% &#123;
        stroke: #82C0CC;
    &#125;
    80%,
    90% &#123;
        stroke: #FFA62B;
    &#125;
&#125;

@keyframes custom-progress-spinner-dash &#123;
    0% &#123;
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    &#125;
    50% &#123;
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35px;
    &#125;
    100% &#123;
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124px;
    &#125;
&#125;
</app-code>
        </p-tabPanel>
        <p-tabPanel header="StackBlitz">
            <ng-template pTemplate="content">
                <iframe src="https://stackblitz.com/edit/primeng-progressspinner-demo?embed=1" style="width: 100%; height: 768px; border: none;"></iframe>
            </ng-template>
        </p-tabPanel>
    </p-tabView>
</div>
